package com.wg.msshopsp.backendmanagement.shop.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;


@Data
@TableName("product")
@NoArgsConstructor // 无参构造
@AllArgsConstructor // 有参构造
@Schema(description = "商品表")
public class Product implements Serializable {
    @Schema(description = "商品编号")
    private Long id;


    @Schema(description = "店铺ID")
    private Integer shopId;

    @Schema(description = "商品名称")
    private String name;

    @Schema(description = "商品主图")
    private String mainImg;


    private String img;

    @Schema(description = "商品描述")
    private String productDesc;

    @Schema(description = "商品状态")
    private String status;

    @Schema(description = "创建时间")
    private String createTime;

    private Double priceBefore;
    private Double priceAfter;
    @Schema(description = "商品库存")
    private Integer count; // 新增库存属性

    @Schema(description = "商品类型")
    private String type;

    @Schema(description = "已售")
    private Integer buyEd;

     // 商品包含多个规格（比如“颜色”和“尺码”）
    private List<ProductSpec> specs; // 一对多关系

}
